//
//  CusCollectionReusableView.m
//  22-QMusicMVHomework
//
//  Created by dllo on 16/8/12.
//  Copyright © 2016年 ZHW. All rights reserved.
//

#import "CusCollectionReusableView.h"
#import "List.h"
#import "MvList.h"
#import "UIButton+WebCache.h"

@interface CusCollectionReusableView ()
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UIButton *picButton;
@property (weak, nonatomic) IBOutlet UILabel *singerNameLabel;
@property (weak, nonatomic) IBOutlet UILabel *mvDescLabel;

@end

@implementation CusCollectionReusableView

- (void)setList:(List *)list {
    _list = list;

    [_picButton sd_setBackgroundImageWithURL:[NSURL URLWithString:list.mvlist[0].picurl] forState:UIControlStateNormal];
    [_picButton sd_setBackgroundImageWithURL:[NSURL URLWithString:list.mvlist[0].picurl] forState:UIControlStateHighlighted];
    _nameLabel.text = list.name;
    _singerNameLabel.text = [NSString stringWithFormat:@"%@-%@", list.mvlist[0].mvtitle, list.mvlist[0].singername];
    _mvDescLabel.text = list.mvlist[0].mvdesc;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

@end
